import * as Blockly from 'blockly/core';

const generators = {};

const Generator = Blockly.Arduino ?? Blockly.Python;

generators.block_tool_color_type0 = function () {
    const COLOR_VALUE = this.getFieldValue('COLOR');
    this.setColour(COLOR_VALUE);
    return [COLOR_VALUE, Generator.ORDER_ATOMIC];
};

generators.block_tool_color_type1 = function () {
    const COLOR_VALUE = this.getFieldValue('COLOR');
    return [COLOR_VALUE, Generator.ORDER_ATOMIC];
};

generators.block_tool_color_type2 = generators.block_tool_color_type1;

export default generators;